home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
program
/
nrpas13.zip
/
GAMMQ.DEM
< prev
next >
Wrap
Text File
|
1991-04-29
|
621b
|
30 lines
PROGRAM d6r7(input,output,dfile);
(* driver for routine GAMMQ *)
VAR
a,val,x : real;
i,nval : integer;
txt : string[25];
dfile : text;
(*$I MODFILE.PAS *)
(*$I GAMMLN.PAS *)
(*$I GSER.PAS *)
(*$I GCF.PAS *)
(*$I GAMMQ.PAS *)
BEGIN
glopen(dfile,'fncval.dat');
REPEAT readln(dfile,txt) UNTIL (txt = 'Incomplete Gamma Function');
readln(dfile,nval);
writeln(txt);
writeln('a':4,'x':11,'actual':14,'gammq(a,x)':14);
FOR i := 1 to nval DO BEGIN
readln(dfile,a,x,val);
writeln(a:6:2,x:12:6,(1.0-val):12:6,gammq(a,x):12:6)
END;
close(dfile)
END.